#include "cppTutorSizeof.h"

#include <iostream>
#include <string.h>

// log framework
#include "cppTutorLog.h"
extern CcppTutorLog Log;
 
using namespace std;

void CcppTutorSizeof :: m_Sizeof ()
{
    Log << "ENTER : CcppTutorSizeof :: m_Sizeof" << endl;

    char Arr[] = "www.ccplusplus.com";
    char *pArr = "www.ccplusplus.com";
    
    cout << "sizeof (char)\t\t = \t" << sizeof (c) << endl;
    cout << "sizeof (short)\t\t = \t" << sizeof (s) << endl;
    cout << "sizeof (int)\t\t = \t" << sizeof (i) << endl;
    cout << "sizeof (long)\t\t = \t" << sizeof (l) << endl;
    cout << "sizeof (float)\t\t = \t" << sizeof (f) << endl;
    cout << "sizeof (double)\t\t = \t" << sizeof (d) << endl;
    cout << "sizeof (long double)\t = \t" << sizeof (ld) << endl;
    cout << "sizeof (Primitives)\t = \t" << sizeof (Primitives) << endl;
    
    cout << "sizeof char Arr[] = www.ccplusplus.com;\t = \t" << sizeof (Arr) << endl;
    cout << "sizeof char *pArr = www.ccplusplus.com;\t = \t" << sizeof (pArr) << endl;
    cout << "strlen char Arr[] = www.ccplusplus.com;\t = \t" << strlen (Arr) << endl;
    cout << "strlen char *pArr = www.ccplusplus.com;\t = \t" << strlen (pArr) << endl;
    
    Log << "EXIT  : CcppTutorSizeof :: m_Sizeof" << endl;
}